Hello, Inside one of our scripts, we have to invoke an external tool (a VBS script) to perform some time-consuming actions. Initially, this script call was the last action of the dxl script, so a call to the function system did the trick. Now, other actions are required following the execution of the VBS script, so we had to rely on the function win32SystemWait_. But we noticed that while the dxl engine waits for the VBS script to complete, DOORS processor usage skyrockets, which in turns slows down the execution of the VBS script by a non negligeable amount. Any input/workaround would be welcome to circumvene this problem.
Vincent.
P.S. As this is my first post here, I'd like to thank here the many contributors who helped me more than once to make the best of dxl :) VincentCoisy - Wed Jul 09 11:08:30 EDT 2014 |
Re: Performance issue using win32SystemWait_ Take a look at the "Parallels" project: https://github.com/domoran/DXLParallels Inside the lib folder you find the "shell.inc" which allows you to control execution of processes asynchronously. You can then use the doors sleep_ perm to wait for your processes to finish, which should not affect CPU usage. If you want your DOORS client to be still usable while the shell scripts run, you can also use a timer on a GUI to trigger and wait for the shell scripts. Hope this helps, regards, Mathias |
Re: Performance issue using win32SystemWait_ Hello I do not know the solution using win32systemWait. I start my script using the WScript-Object, which is installed on each PC.
OleAutoObj objVbaShell = oleCreateAutoObject("WScript.Shell"); Then you have to create some OLE-Arguments: put(objVbaShellArguments, sVbaBatchFileName); put(objVbaShellArguments, 0); // No Window put(objVbaShellArguments, true); // Wait for End of external routine And then you can start the script: string sErrorMessage = oleMethod(objVbaShell, "Run", objVbaShellArguments, iResult);
Best regard Wolfgang
|
Re: Performance issue using win32SystemWait_ Wolfgang Uhr - Thu Jul 10 05:03:43 EDT 2014 Hello I do not know the solution using win32systemWait. I start my script using the WScript-Object, which is installed on each PC.
OleAutoObj objVbaShell = oleCreateAutoObject("WScript.Shell"); Then you have to create some OLE-Arguments: put(objVbaShellArguments, sVbaBatchFileName); put(objVbaShellArguments, 0); // No Window put(objVbaShellArguments, true); // Wait for End of external routine And then you can start the script: string sErrorMessage = oleMethod(objVbaShell, "Run", objVbaShellArguments, iResult);
Best regard Wolfgang
Hey Wolfgang, the shell library I mentioned above is a wrapper around this COM object. Just for info. Regards, Mathias |
Re: Performance issue using win32SystemWait_ Mathias Mamsch - Thu Jul 10 07:56:51 EDT 2014 Hey Wolfgang, the shell library I mentioned above is a wrapper around this COM object. Just for info. Regards, Mathias Thanks Mathias, one day you should make your own homepage to link all the scripts and projects you have placed somewhere in the web. |
Re: Performance issue using win32SystemWait_ Thanks a lot to both of you, it works perfectly ! And it will allow me to get rid of all those other win32SystemWait_ calls? I didn't bother using the library this time, Mathias, as I was looking for a quick solution. But I'll keep a close eye to it as its functionalities may greatly improve our workflow !
Regards, Vincent. |